# -*- coding: utf-8 -*-
"""
Created on Sun Oct 27 00:40:53 2019

@author: XCL01
"""

def trim(s):    
    if s[:1] == ' ':#这里如果用s[0]下面就会报错
        return trim(s[1:])#返回定义函数
    elif s[-1:]==' ':#同理9行备注(原理是sample11解释)
        return trim(s[:-1])#返回定义函数
    return s
print(trim('          ')=='')